package com.smart.model.dtomapper;

import com.smart.model.domain.ProjectItemDO;
import com.smart.model.request.ProjectItemAddRequest;
import com.smart.model.request.ProjectItemRequest;
import com.smart.model.request.ProjectItemUpdateRequest;
import com.smart.model.vo.ProjectItemVO;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

/**
 * @author zhanghong
 */
@Mapper(componentModel = "spring")
public interface ProjectItemDtoMapper {

    ProjectItemDtoMapper INSTANCE = Mappers.getMapper(ProjectItemDtoMapper.class);

    /**
    * DO to VO
    * @param projectItemDO
    * @return
    */
    ProjectItemVO do2VO(ProjectItemDO projectItemDO);

    /**
     * request to DO
     * @param request
     * @return
     */
    ProjectItemDO request2DO(ProjectItemRequest request);

    /**
     * request to DO
     * @param request
     * @return
     */
    ProjectItemDO request2DO(ProjectItemAddRequest request);

    /**
     * request to DO
     * @param request
     * @return
     */
    ProjectItemDO request2DO(ProjectItemUpdateRequest request);
}
